package com.service.impl;

import com.dao.BusinessMapper;
import com.model.Business;
import com.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class BusinessServiceImpl implements BusinessService {
    @Autowired
    private BusinessMapper mapper;
    @Override
    public List<Business> listBusinessByTypeId(Integer orderTypeId) throws Exception {
        List<Business> list = new ArrayList<>();
        list = mapper.listBusinessByOrderTypeId(orderTypeId);
        return list;
    }

    @Override
    public Business getBusinessById(Integer businessId) throws Exception {
        Business business = null;
        business = mapper.getBusinessById(businessId);
        return business;
    }
}
